package personal.lijun.skeleton.springcloud.serviceprovider;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import personal.lijun.skeleton.springcloud.serviceprovider.interceptor.WrapApiResultInterceptor;

/**
 * @Auther: lijun@sstcsoft.com
 * @Date: 2019-10-12 11:48
 */
@Configuration
public class WebAppConfiguration implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        InterceptorRegistration interceptor = registry.addInterceptor(new WrapApiResultInterceptor());
        interceptor.addPathPatterns("/resources/**");
    }
}
